package com.lagou.boot;

import com.lagou.UserService;
import com.lagou.client.RPCConsumer;

public class ConsumerBoot {

  public static final String providerName = "UserService#sayHello#";

  public static void main(String[] args) throws InterruptedException {

    RPCConsumer rpcConsumer = new RPCConsumer();
    UserService userService = (UserService) rpcConsumer.creatProxy(UserService.class, providerName);
    while (true) {
      Thread.sleep(2000);
      String result = userService.sayHello("are you ok ?");
      System.out.println(result);
    }
  }
}
